package com.wxq.demo.activemq;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * 消费者
 */
@Component
public class TopicCustomer {
    @JmsListener(destination = "topic-my")
    public void subscriber1(String text) {
        System.out.println("消费者11111" + text);
    }

    @JmsListener(destination = "topic-my")
    public void subscriber2(String text) {
        System.out.println("消费者22222" + text);
    }
}
